package com.zhenyi.boya.interceptor;

import com.boya.common.model.BySchool;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.core.Controller;
import com.utils.AuthUtils;

public class InfoInterceptor implements Interceptor {

	@Override
	public void intercept(Invocation inv) {
		Controller controller = inv.getController();
		BySchool school = BySchool.dao.findById(AuthUtils.getTokenUid(controller));
		controller.setAttr("school", school);
		inv.invoke();
	}

}
